//==============================================================================
// Copyright (c) 2008-2013 Niall Ryan. All Rights Reserved.
//==============================================================================

#ifndef HYDRA_HASHUTIL_H
#define HYDRA_HASHUTIL_H 1

#include <functional>
namespace Hydra
{
	namespace HashUtil
	{
		template<typename T>
		struct HashFunction
		{
			unsigned int operator()(const T& x) const
			{
				return x;
			}
		};

		template<typename T>
		struct HashFunction<T*>
		{
			unsigned int operator()(const T* x) const
			{
				return static_cast<unsigned int>(reinterpret_cast<uintptr_t>(x));
			}
		};

		template<typename T>
		struct EqualTo
		{
			bool operator()(const T& x, const T& y) const
			{
				return (x == y);
			}
		};
	}
}

#endif
